<template>
	<view class="home">
		<!-- 		<view class="tophead">
			<uni-icons type="left" color="#666" size="26" @click="retFn"></uni-icons>
			<view class="">
				APP辅助测流
			</view>
			<view class="" style="width: 100rpx;display: flex;justify-content: flex-end;align-items: center;">
				<view class="" style="margin-right: 20rpx;">
					<uni-icons type="help" color="#000000" size="26" @click="auxiliaryCurrentMeasurementFn"></uni-icons>
				</view>
			</view>
		</view> -->
		<u-navbar title="APP辅助人工测流" :leftIconSize="24" :bgColor="bgColor" rightIcon="question-circle" :autoBack="true"
			:placeholder="true" safeAreaInsetTop>
			<view class="u-nav-slot" slot="right" @click="auxiliaryCurrentMeasurementFn">
				<u-icon name="question-circle" color="#000" size="24"></u-icon>
			</view>
		</u-navbar>
		<view class="tabs_monitor">
			<view class="tabs_i" hover-class="tabs_i_acv" v-for="(i,index) in monitorArr" :key="index"
				@click="monitorFn(i.text)">
				<image class="img" :src="i.img" mode=""></image>
				<view class="text">
					<view class="">
						{{i.text}}
					</view>
				</view>
			</view>
			<view class="celouzdbom">
				<view class="celouzd_box">
					设置测控参数
				</view>
				<view class="celouzd_box">
					修正流速系数
				</view>
			</view>
			<!-- 			<view class="celouzd">
				<view class="celouzd_box">
					设置测控参数
				</view>
				<view class="celouzd_box">
					修正流速系数
				</view>
			</view> -->
			<!-- 			<view class="celouzdbom">
				<view class="celouzd_box" @click="zhonghduanAA">
					配置测流终端
				</view>
				<view class="celouzd_box" @click="zhonghduanBB">
					设置测段参数
				</view>
			</view> -->
		</view>
		<!-- 弹窗 -->
		<u-popup :show="show" mode="center" @close="close" @open="open">
			<view>
				<text>人生若只如初见，何事秋风悲画扇</text>
			</view>
		</u-popup>
		<!-- 流量计算器 -->
		<u-modal :show="jisuanqi" title="选择测流计算方式" :closeOnClickOverlay="true" :showConfirmButton="false"
			@close="modalclose">
			<view class="slot-content">
				<view class="butta" @click="jisuanliusuFn" hover-class="buttb_av">
					点流速计算
				</view>
				<view class="buttb" @click="jisuanxinhaoFn" hover-class="buttb_av">
					信号数计算
				</view>
				<!-- 				<u-button type="primary" text="点流速计算" @click="jisuanliusuFn"></u-button>
				<u-button style="margin-top: 30rpx;" type="success" text="信号数计算" @click="jisuanxinhaoFn"></u-button> -->
			</view>
		</u-modal>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				bgColor: '#f1f4f6',
				jisuanqi: false,
				show: false,
				monitorArr: [{
					img: require('@/static/nianj.png'),
					text: '转子式流速仪'
				}, {
					img: require('@/static/shezhi.png'),
					text: '多普勒流速仪'
				}, {
					img: require('@/static/xinh.png'),
					text: '电磁波流速仪'
				}, {
					img: require('@/static/shouchigan.png'),
					text: '浮标法测流'
				}],
			}
		},
		onLoad(option) {

		},
		methods: {
			// 返回
			retFn() {
				uni.navigateBack({
					delta: 1
				});
			},
			auxiliaryCurrentMeasurementFn() {
				//在起始页面跳转到test.vue页面并传递参数
				uni.navigateTo({
					url: '/pages/manualFlowMeasurement/gongnengshuoming?id=' + '流速仪测流'
				});
			},
			modalclose() {
				console.log('*-----');
				this.jisuanqi = false
			},
			jisuanliusuFn() {
				uni.navigateTo({
					url: '/pages/currentMeasuringCar/increaseList?toolName=' + '流量计算器(点流速)'
				});
				this.jisuanqi = false
			},
			jisuanxinhaoFn() {
				uni.navigateTo({
					url: '/pages/currentMeasuringCar/currentMeterList?toolName=' + '流量计算器(信号数)'
				});
				this.jisuanqi = false
			},
			monitorFn(i) {
				// if (i == '计时计数器 (自动)') {
				// 	uni.navigateTo({
				// 		url: '/pages/currentMeasuringCar/currentMeterList?toolName=' + '计时计数器(自动)' +
				// 			'&currentMeterType=' + 0
				// 	});
				// }
				if (i == '转子式流速仪') {
					uni.navigateTo({
						url: '/pages/currentMeasuringCar/currentMeterList?toolName=' + '计时计数器' +
							'&currentMeterType=' + 0
					});
				}
				if (i == '多普勒流速仪') {
					uni.navigateTo({
						url: '/pages/currentMeasuringCar/increaseList?toolName=' + '多普勒测流' +
							'&currentMeterType=' + 0
					});
				}
				if (i == '电磁波流速仪') {
					// uni.navigateTo({
					// 	url: '/pages/currentMeasuringCar/increaseList?toolName=' + '多普勒测流' +
					// 		'&currentMeterType=' + 0
					// });
				}
				if (i == '浮标法测流') {
					uni.navigateTo({
						url: '/pages/currentMeasuringCar/increaseList?toolName=' + '浮标法测流'
					});
					// uni.navigateTo({
					// 	url: '/pages/manualFlowMeasurement/buoyGauging'
					// });
				}
				if (i == '流量计算器') {
					this.jisuanqi = true
				}
				// if (i == '流量计算器 (点流速)') {

				// }
				// if (i == '流量计算器 (信号数)') {

				// }
				if (i == '水情填报表') {
					uni.navigateTo({
						url: '/pages/currentMeasuringCar/increaseList?toolName=' + '水情填报表' +
							'&currentMeterType=' + 1
					});
				}
				if (i == '测流记录表') {
					uni.navigateTo({
						url: '/pages/manualFlowMeasurement/measuringCurrentRecordSheet'
					});
					// this.show = true
					// uni.navigateTo({
					// 	url: '/pages/currentMeasuringCar/historicalRecord'
					// });
				}
			},
			// 弹窗
			open() {
				// console.log('open');
			},
			close() {
				this.show = false
				// console.log('close');
			},
			zhonghduanAA() {
				uni.navigateTo({
					url: '/pages/settings/cesuyi'
				});
			},
			zhonghduanBB() {
				uni.navigateTo({
					url: '/pages/settings/course'
				});
			},
		}
	}
</script>
<style scoped lang="scss">
	.tophead {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 80rpx 20rpx 10rpx 20rpx;
		color: #000000;
		background-color: #f3f3f3;
	}

	.celouzd {
		// margin-top: 50rpx;
		// display: flex;
		// align-items: center;
		// justify-content: space-around;
		display: flex;
		align-items: center;
		justify-content: space-around;
		position: fixed;
		margin: 30rpx;
		bottom: 180rpx;
		left: 0;
		right: 0;
		z-index: 999;
		/* 确保在其他元素上方 */
		padding: 30rpx;
		/* 可选内边距 */

		.celouzd_box {
			width: 260rpx;
			text-align: center;
			padding: 20rpx;
			border-radius: 20rpx;
			border: 1rpx solid #000;
			background-color: #e4ebef;
			color: #000;
			font-size: 40rpx;
		}
	}

	.celouzdbom {
		display: flex;
		align-items: center;
		justify-content: space-around;
		position: fixed;
		margin: 30rpx;
		bottom: 20rpx;
		left: 0;
		right: 0;
		z-index: 999;
		/* 确保在其他元素上方 */
		padding: 30rpx;
		/* 可选内边距 */

		.celouzd_box {
			width: 260rpx;
			text-align: center;
			margin-bottom: 30rpx;
			padding: 20rpx;
			border-radius: 20rpx;
			border: 1rpx solid #000;
			background-color: #e8e4ef;
			color: #000;
			font-size: 40rpx;
		}
	}

	// 水情
	.tabs_monitor {
		padding: 30rpx;

		.tabs_i {
			margin-bottom: 30rpx;
			padding: 30rpx;
			border-radius: 20rpx;
			text-align: center;
			// border: 3rpx solid #ffffff;
			// box-shadow: 0rpx 0rpx 10rpx 10rpx rgba(98, 98, 98, 0.1);
			background-color: #ffffff;
			display: flex;
			align-items: center;
			justify-content: space-around;

			.img {
				width: 80rpx;
				height: 80rpx;
			}

			.text {
				width: 550rpx;
				color: #000000;
				font-size: 45rpx;
			}
		}

		.tabs_i_acv {
			background-color: #dcdcda;
		}
	}

	.slot-content {
		width: 500rpx;
		font-size: 50rpx;
		color: #fff;

		.butta {
			padding: 10rpx;
			border-radius: 10rpx;
			text-align: center;
			margin-top: 50rpx;
			background-color: #6f8cac;
		}

		.buttb {
			padding: 10rpx;
			border-radius: 10rpx;
			text-align: center;
			margin-top: 50rpx;
			background-color: #6dac7f;
		}

		.buttb_av {
			background-color: rgba(0, 0, 0, 0.5);
		}
	}

	.u-nav-slot {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 5rpx 10rpx;
	}
</style>
<style>
	page {
		background-color: #f2f1f6;
	}
</style>